package com.yql.entity;

import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Digits;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class Company implements Serializable {
    private Integer id;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date cwDate;
    private Integer yid;
    private Integer oid;
    private String cname;
    private String oname;
    private Integer courseId;
    private String courseName;
    private String digest;
    @Digits(integer = 10,fraction = 2,message = "借方数值为整数、1位小数、2位小数")
    private BigDecimal debit;
    @Digits(integer = 10,fraction = 2,message = "贷方数值为整数、1位小数、2位小数")
    private BigDecimal credit;
    private BigDecimal balance;
    private Integer rtype;
    private BigDecimal moneystart;
    private BigDecimal moneyend;
    private Integer type;
    private String mohu;
    private Integer pid;

    @Override
    public String toString() {
        return "Company{" +
                "id=" + id +
                ", cwDate=" + cwDate +
                ", yid=" + yid +
                ", oid=" + oid +
                ", cname='" + cname + '\'' +
                ", oname='" + oname + '\'' +
                ", courseId=" + courseId +
                ", courseName='" + courseName + '\'' +
                ", digest='" + digest + '\'' +
                ", debit=" + debit +
                ", credit=" + credit +
                ", balance=" + balance +
                ", rtype=" + rtype +
                ", moneystart=" + moneystart +
                ", moneyend=" + moneyend +
                ", type=" + type +
                ", mohu='" + mohu + '\'' +
                ", pid=" + pid +
                '}';
    }

    public Company() {
    }

    public Company(Integer id, Date cwDate, Integer yid, Integer oid, String cname, String oname, Integer courseId, String courseName, String digest, BigDecimal debit, BigDecimal credit, BigDecimal balance, Integer rtype, BigDecimal moneystart, BigDecimal moneyend, Integer type, String mohu, Integer pid) {
        this.id = id;
        this.cwDate = cwDate;
        this.yid = yid;
        this.oid = oid;
        this.cname = cname;
        this.oname = oname;
        this.courseId = courseId;
        this.courseName = courseName;
        this.digest = digest;
        this.debit = debit;
        this.credit = credit;
        this.balance = balance;
        this.rtype = rtype;
        this.moneystart = moneystart;
        this.moneyend = moneyend;
        this.type = type;
        this.mohu = mohu;
        this.pid = pid;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Date getCwDate() {
        return cwDate;
    }

    public void setCwDate(Date cwDate) {
        this.cwDate = cwDate;
    }

    public Integer getYid() {
        return yid;
    }

    public void setYid(Integer yid) {
        this.yid = yid;
    }

    public Integer getOid() {
        return oid;
    }

    public void setOid(Integer oid) {
        this.oid = oid;
    }

    public String getCname() {
        return cname;
    }

    public void setCname(String cname) {
        this.cname = cname;
    }

    public String getOname() {
        return oname;
    }

    public void setOname(String oname) {
        this.oname = oname;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getDigest() {
        return digest;
    }

    public void setDigest(String digest) {
        this.digest = digest;
    }

    public BigDecimal getDebit() {
        return debit;
    }

    public void setDebit(BigDecimal debit) {
        this.debit = debit;
    }

    public BigDecimal getCredit() {
        return credit;
    }

    public void setCredit(BigDecimal credit) {
        this.credit = credit;
    }

    public BigDecimal getBalance() {
        return balance;
    }

    public void setBalance(BigDecimal balance) {
        this.balance = balance;
    }

    public Integer getRtype() {
        return rtype;
    }

    public void setRtype(Integer rtype) {
        this.rtype = rtype;
    }

    public BigDecimal getMoneystart() {
        return moneystart;
    }

    public void setMoneystart(BigDecimal moneystart) {
        this.moneystart = moneystart;
    }

    public BigDecimal getMoneyend() {
        return moneyend;
    }

    public void setMoneyend(BigDecimal moneyend) {
        this.moneyend = moneyend;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getMohu() {
        return mohu;
    }

    public void setMohu(String mohu) {
        this.mohu = mohu;
    }

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }
}
